﻿using Application;
using Application.Interfaces.Logging;
using System.Web.Mvc;

namespace Web.Infrastructure.Core
{
    public class LogHandleErrorAttribute : HandleErrorAttribute
    {
        public override void OnException(ExceptionContext filterContext)
        {
            AppEngine.Container.GetInstance<ILogger>().Log(filterContext.Exception.ToString());
            base.OnException(filterContext);
        }
    }
}